gender=input()
age=int(input())
if gender == 'boy':
    if age >= 22:
        print('yes')
    else:
        print('no')
elif gender == 'girl':
    if age >= 20:
        print('yes')
    else:
        print('no')
else:
    print('Unrecognized gender')